package com.yami.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.dto.ProfitBackInfoDto;
import com.yami.shop.bean.enums.ProfitBackStatus;
import com.yami.shop.bean.enums.ProfitTypeConst;
import com.yami.shop.bean.model.Order;
import com.yami.shop.bean.model.ProfitBackInfo;

import java.util.List;

public interface ProfitBackInfoService extends IService<ProfitBackInfo> {
    /**
     * 依据分润类型计算订单总返点
     * @param order
     * @param profitType
     * @return
     */
    double calProfitByType(Order order, ProfitTypeConst profitType);


    /**
     * 获取某人分润记录
     * @param uid
     * @return
     */
    List<ProfitBackInfo> getOneProfitBackInfos(String uid, Integer profitBackStatus);
}
